//
//  cinemaTableViewCell.m
//  简单豆瓣不得不交版 1 带
//
//  Created by dllo on 16/6/23.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "cinemaTableViewCell.h"
#import "UIImageView+WebCache.h"


@implementation cinemaTableViewCell


- (void)dealloc
{

    [_myImageView release];
    [_myLabel3 release];
    [_myLabel2 release];
    [_myLabel1 release];
    [super dealloc];
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self doIt];
    }
    return self;
}

- (void)doIt {
    
    
    self.myImageView = [[UIImageView alloc] init];
    self.myImageView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.myImageView];
    self.myImageView.image = [UIImage imageNamed:@"bg_eventlistcell@2x.png"];
    [_myImageView release];

    self.myLabel1 = [[UILabel alloc] init];
 //   self.myLabel1.backgroundColor = [UIColor whiteColor];
    [self.myImageView addSubview:self.myLabel1];
    self.myLabel1.font = [UIFont systemFontOfSize:21];
    [_myLabel1 release];
    
    self.myLabel2 = [[UILabel alloc] init];
    [self.myImageView addSubview:self.myLabel2];
    self.myLabel2.numberOfLines = 0;
     self.myLabel2.font = [UIFont systemFontOfSize:15];
    [_myLabel2 release];
    
    self.myLabel3 = [[UILabel alloc] init];
 //   self.myLabel3.backgroundColor = [UIColor whiteColor];
    [self.myImageView addSubview:self.myLabel3];
       self.myLabel3.font = [UIFont systemFontOfSize:14];
    [_myLabel3 release];
    
}

- (void)layoutSubviews{
    [super layoutSubviews];
     self.myImageView.frame = CGRectMake(15, 10, 384, 140);
    self.myLabel1.frame = CGRectMake(18, 11, 350, 30);
     self.myLabel2.frame = CGRectMake(18, 50, 320, 60);
    self.myLabel3.frame = CGRectMake(18, 118, 350, 15);
   
}

- (void)setModel:(cinemaModel *)model{
    
    if (_model != model) {
        [_model release];
        _model = [model retain];
        
              
    }
   self.myLabel1.text = model.cinemaName;
    self.myLabel2.text = model.address;
    self.myLabel3.text = model.telephone;
    
}










@end
